# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=intelmq
pkgver=3.5.0.r5.g5b76b3645
pkgrel=1
pkgdesc='A tool for collecting and processing security feeds using a message queuing protocol.'
arch=('any')
groups=('blackarch' 'blackarch-misc')
url='https://github.com/certtools/intelmq'
license=('AGPL3')
depends=('python' 'python-dnspython' 'python-psutil' 'python-dateutil'
         'python-termstyle' 'python-pytz' 'python-redis' 'python-requests'
         'python-ruamel-yaml' 'python-psycopg2')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/certtools/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" *.md
}

